﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NGenORM.Library.Code;

namespace NGenORM.Library.Util {
    public class ConnectionFactoryFactory {

        public ConnectionFactory CreateConnection(Project Project) {

            switch (Project.DBServerType) {
                case NGenORM.Library.Enum.DBServerType.MySQL:
                    return new ConnectionFactoryMySQL();
                case NGenORM.Library.Enum.DBServerType.SQLServer:
                    return new ConnectionFactorySQLServer();
                case NGenORM.Library.Enum.DBServerType.Oracle:
                    return new ConnectionFactoryOracle();
                default:
                    return null;
            }

        }




    }
}
